/**
 * @description 校验规则库
 * @author zhongshigui
 * @since
 */

import { PersonnelServiceApi } from "./_personnel";
import { AxiosResponse } from "axios";
import { objectToUrlParams } from "/@/utils/common";
import service from "/@/utils/request";

class RulelibraryServiceApi extends PersonnelServiceApi {
  TestSQL(bean: any, params?: any): Promise<AxiosResponse<any>> {
    let url = this.baseUrl + "/TestSQL";
    url += objectToUrlParams(params, true);
    return service.post(url, bean);
  }
  executeSQL(bean: any, params?: any): Promise<AxiosResponse<any>> {
    let url = this.baseUrl + "/executeSQL";
    url += objectToUrlParams(params, true);
    return service.post(url, bean);
  }
  selectID(bean: any, params?: any): Promise<AxiosResponse<any>> {
    let url = this.baseUrl + "/selectID";
    url += objectToUrlParams(params, true);
    return service.post(url, bean);
  }
}
const rulelibraryServiceApi = new RulelibraryServiceApi(
  "/DataQualityRuleService"
);

export default rulelibraryServiceApi;
